import {
  http
} from '@/utils/http.js'
/**
 * 发送验证码
 */
export const verifyCodeApi = (data) => {
  return http.request({
    url: '/code',
    method: 'get',
    params: data
  })
}
/**
 * 用户登录
 */
export const loginApi = (data) => {
  return http.request({
    url: '/login',
    method: 'POST',
    data
  })
}

/**
 * 密码登录
 */
export const passwordLoginApi = (data) => {
  return http.request({
    url: '/login/password',
    method: 'post',
    data
  })
}

/**
 * 获取用户信息
 */
export const userInfoApi = () => {
  return http.request({
    url: '/patient/myUser',
    method: 'get'
  })
}